<template>
  <div class="left-container">
    <h3>Left 组件 {{count}}</h3>
    <hr />

    <p>count 值：</p>
    <button @click="add" class="btn btn-primary">+1</button>
  </div>
</template>

<script>
import { mapState, mapMutations } from 'vuex'

export default {
  name: 'Left',
  computed: {
    ...mapState(['count'])
  },
  methods: {
    ...mapMutations(['add'])
  }
}
</script>

<style>
</style>
